{% extends "base.html" %}
{# Copyright The IETF Trust 2015-2019, All Rights Reserved #}
{% load origin static %}
{% block title %}Undo RFC Editor state events{% endblock %}

{% block pagehead %}
    <link rel="stylesheet" href="{% static "ietf/css/list.css" %}">
{% endblock %}

{% block content %}
    {% origin %}
    <h1>Undo RFC Editor state events</h1>
    <table class="table table-sm table-striped tablesorter">
        <thead>
            <tr>
                <th scope="col" data-sort="time">Time</th>
                <th scope="col" data-sort="document">Document</th>
                <th scope="col" data-sort="text">Text</th>
                <th scope="col" data-sort="undo">Undo</th>
            </tr>
        </thead>
        <tbody>
            {% for e in events %}
                <tr>
                    <td>{{ e.time|date:"Y-m-d H:i:s" }}</td>
                    <td>
                        <a href="{% url 'ietf.doc.views_doc.document_history' e.doc.name %}">{{ e.doc.name }}</a>
                    </td>
                    <td>{{ e.desc|safe }}</td>
                    <td>
                        <form method="post">
                            {% csrf_token %}
                            <input type="hidden" name="event" value="{{ e.id }}">
                            <button class="btn btn-sm btn-danger" type="submit">Remove</button>
                        </form>
                    </td>
                </tr>
            {% endfor %}
        </tbody>
    </table>
{% endblock %}

{% block js %}
    <script src="{% static "ietf/js/list.js" %}"></script>
{% endblock %}